﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Guedes_Library;
using System.Data;

/// <summary>
/// Summary description for NoticiaModel
/// </summary>
public class FaqModel : GuedesModel<faq>
{
    private EntityKey entityKey;

	public FaqModel()
	{

	}

    public void Salvar(faq faq)
    {
        entityKey = new EntityKey("guedesEntities.faq", "ID", faq.ID);
        Save(faq, entityKey);
    }

    public List<faq> ListarNoticias()
    {
        return SelectAll();
    }
    
    public override void  DoChanges(faq entity, faq novo)
    {
        entity.Dica = novo.Dica;
        entity.Titulo = novo.Titulo;
    }

    public override string GetTabela()
    {
        return "guedesEntities.faq";
    }

    public override string GetKeyTabela()
    {
        return "ID";
    }
}